package com.dao.impl;

import com.dao.BaseDao;
import com.dao.intf.ReportDao;
import com.entity.Report;

import java.util.List;

public class ReportDaoImpl extends BaseDao implements ReportDao {
    @Override
    public int addReport(Integer userId, String reportContent) {
        String sql=" INSERT INTO `report` (`userId`,`reportContent`) VALUES(?,?)";
        return update(sql,userId,reportContent);
    }

    @Override
    public List<Report> queryReport() {
        String sql="  SELECT * FROM `report` ";
        return queryForList(Report.class,sql);
    }
}
